<template>
  <div class="fullscreen">
    <i class="el-icon-full-screen" @click="fullscr" />
  </div>
</template>

<script>
import screenfull from 'screenfull'
export default {
  name: 'Fullscreen',
  methods: {
    fullscr() {
      console.log(screenfull)
      if (!screenfull.isEnabled) {
        this.$message.error('对不起当前浏览器不支持全屏')
      }
      screenfull.toggle()
    }
  }
}
</script>

<style lang="scss" scoped>
.fullscreen{
    i{
        color: #fff;
        font-size: 20px;
    }
}
</style>
